package SQL.abysnSQL;

/*
 * having-condition ::= having-value cop having-value
						| having-condition AND having-condition
						| having-condition OR having-condition
						| bool-expr
 */

public class HvCondition {
	public HvValue left, right;
	public HvCondition leftC,rightC;
	public Cop cop;
	public BoolCondition bool;
	public TYPE type;
	
	public static enum TYPE{
		COP,AND,OR,BOOL
	}
	
	public HvCondition(HvValue l,Cop op,HvValue r){
		left = l;
		right = r;
		cop = op;
		type = TYPE.COP;
	}
	
	public HvCondition(HvCondition l,HvCondition r,boolean b){
		leftC = l;
		rightC = r;
		if(b){
			type = TYPE.AND;
		}
		else
			type = TYPE.OR;
	}
	
	public HvCondition(BoolCondition b){
		bool = b;
		type = TYPE.BOOL;
	}
	
}
